package com.baidu.eureka.controller.role;

import com.baidu.eureka.entity.Role;
import com.baidu.eureka.service.RoleService;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (Role)表控制层
 *
 * @author makejava
 * @since 2020-07-18 11:39:22
 */
@Api(tags = "1.0版本-2020719")
@RestController
@RequestMapping("role")
public class RoleController {
    /**
     * 服务对象
     */
    @Resource
    private RoleService roleService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "id查询")
    @GetMapping("selectOne")
    public Role selectOne(Long id) {
        return this.roleService.queryById(id);
    }

}